{{#jackson}}
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true )
@JsonSubTypes({
  {{#if discriminator.mapping}}
    {{#each discriminator.mapping}}
        @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"),
    {{/each}}
  {{else}}
    {{#children}}
        @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"),
    {{/children}}
  {{/if}}
})
{{/jackson}}